refactor: remove Bun artifacts and convert remaining Bun APIs#1002
Merged
Conversation
Contributor
|
cd58f70 to
e57f6cc
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e57f6cc. Configure here.
e5e0b77 to
41ee053
Compare
- Remove @types/bun, bun.lock, docs/bun.lock, bunfig.toml - Remove .cursor/rules/bun-cli.mdc (outdated) - Convert Bun.spawn → node:child_process in local/run.ts - Convert Bun.sleep → node:timers/promises in local/server.ts - Remove spawn/sleep polyfills from node-polyfills.ts - Add src/global.d.ts for Worker and RegExp.escape types - Remove isBun guards from tests (now run on Node)
41ee053 to
82779e8
Compare
Contributor
Codecov Results 📊✅ Patch coverage is 83.33%. Project has 4236 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 81.63% 81.86% +0.23%
==========================================
Files 328 328 —
Lines 23343 23349 +6
Branches 15111 15114 +3
==========================================
+ Hits 19055 19113 +58
- Misses 4288 4236 -52
- Partials 1614 1621 +7Generated by Codecov Action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Phase 5: Bun Cleanup
Final phase of the Bun → Node.js migration. Removes Bun-specific artifacts and converts the last remaining Bun API usages.
Changes
Removed Bun artifacts:
bun.lockanddocs/bun.lock— replaced bypnpm-lock.yaml(added in Phase 4)bunfig.toml— Bun configuration, no longer needed@types/bunfromdevDependencies— replaced bysrc/global.d.ts.cursor/rules/bun-cli.mdc— outdated Bun-specific Cursor AI ruleConverted remaining Bun APIs:
src/commands/local/run.ts:Bun.spawn()→spawn()fromnode:child_processsrc/commands/local/server.ts:Bun.sleep()→sleep()fromnode:timers/promisesspawn/sleeppolyfills fromscript/node-polyfills.tsAdded type declarations (
src/global.d.ts):Workerclass with typed event map (previously from@types/bun)RegExp.escape()augmentation (ES2025, Node 23.6+)Test fixes:
test/commands/local/run.test.ts: removedisBunskip guard (now runs on Node)test/lib/db/concurrent.test.ts: removedisBunskip guard, switched worker spawn totsxtest/script/node-polyfills.test.ts: removed spawn polyfill testsIntentionally kept
bun:sqlitetry/catch insrc/lib/db/sqlite.ts— compiled Bun binary still needs itnode-polyfills.ts— still used bybundle.tsfor the npm CJS distributionBun.build()inscript/build.ts— no Node equivalent for binary compilationsetup-buninbuild-binaryCI job